Ext
		.define(
				'HRMobile.model.LeaveRequest',
				{
					extend : 'Ext.data.Model',
					config : {
						fields : [
								'id',
								'empFullName',
								'firstLeave',
								'lastLeave',
								'leaveType',
								'empComment',
								'supComment',
								'approved',
								{
									name : 'status',
									convert : function(value, record) {
										var approved = record.get('approved');
										if (approved == true)
											return 'Approved';
										else if (approved == false)
											return 'Rejected';
										else
											return 'Pending';
									}
								},
								{
									name: 'statusColor',
									convert : function(value, record) {
										var approved = record.get('approved');
										if (approved == true)
											return 'green';
										else if (approved == false)
											return 'red';
										else
											return '#6FA1A8';
									}
										
								}]
					}
				});